<template>
  <div id="profile">
    <nav-bar class="profile-nav"><div slot="center">个人中心</div></nav-bar>
    <user-info></user-info>

    <account-info :account-info="accountInfo"></account-info>

    <list-view class="order-list" :list-data="orderList"></list-view>
    <list-view class="service-list" :list-data="serviceList"></list-view>
  </div>
</template>

<script>
  import NavBar from "@/components/common/navbar/NavBar";

  import UserInfo from "@/views/profile/childComps/UserInfo";
  import AccountInfo from "@/views/profile/childComps/AccountInfo";
  import ListView from "@/views/profile/childComps/ListView";



  export default {
    name: "Profile",
    components: {
      NavBar,
      UserInfo,
      AccountInfo,
      ListView
    },
    data() {
      return {
        accountInfo: [
          {number: '0.00', unit: '元', info: '我的余额'},
          {number: '0', unit: '个', info: '我的优惠'},
          {number: '0', unit: '分', info: '我的积分'}
        ],
        orderList: [
          {icon: '#order', iconColor: '#ff8198', info: '我的消息'},
          {icon: '#point', iconColor: '#fc7b53', info: '积分商城'},
          {icon: '#vip', iconColor: '#ffc636', info: '会员卡'},
        ],
        serviceList: [
          {icon: '#service', iconColor: '#ff8198', info: '我的购物车'},
          {icon: '#download', iconColor: '#ff8198', info: '下载购物APP'},
        ]
      }
    }
  }
</script>

<style scoped>
  #profile {
    background-color: #f2f2f2;
  }

  .profile-nav {
    background-color: var(--color-tint);
    color: #fff;
    font-weight: 700;
  }

  .order-list, .service-list {
    margin-top: 12px;
  }
</style>
